Model run by trashe using Apollo 0.4.0 on R 4.5.3 for Linux. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : LC_with_covariates Model description : LC model with covariates in class allocation model on Swiss route choice data Model run at : 2026-11-02 21:40:49 Estimation method : bgw Estimation diagnosis : Relative function convergence (favorable) Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -8.872027 reciprocal of condition number : 5.37479e-05 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 3 Model without mixing LL(start) : -2067.4 LL (whole model) at equal shares, LL(0) : -2420.47 LL (whole model) at observed shares, LL(C) : -2420.39 LL(final, whole model) : -1559.01 Rho-squared vs equal shares : 0.3559 Adj.Rho-squared vs equal shares : 0.3509 Rho-squared vs observed shares : 0.3559 Adj.Rho-squared vs observed shares : 0.3513 AIC : 3142.03 BIC : 3215.93 LL(0,Class_1) : -2420.47 LL(final,Class_1) : -2467.08 LL(0,Class_2) : -2420.47 LL(final,Class_2) : -1776.34 Estimated parameters : 12 Time taken (hh:mm:ss) : 00:00:6.27 pre-estimation : 00:00:2.14 estimation : 00:00:3.87 post-estimation : 00:00:0.26 Iterations : 25 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_1 -0.03463 0.047659 -0.7265 0.052802 -0.6558 asc_2 0.00000 NA NA NA NA beta_tt_a -0.20953 0.025248 -8.2987 0.048028 -4.3626 beta_tt_b -0.03724 0.005434 -6.8534 0.009954 -3.7417 beta_tc_a -0.77575 0.082903 -9.3574 0.116562 -6.6553 beta_tc_b -0.04989 0.013038 -3.8268 0.013418 -3.7185 beta_hw_a -0.05467 0.005467 -9.9985 0.008673 -6.3032 beta_hw_b -0.03426 0.003120 -10.9826 0.004998 -6.8549 beta_ch_a -2.67043 0.222946 -11.9779 0.300252 -8.8939 beta_ch_b -0.60949 0.074744 -8.1543 0.104717 -5.8203 delta_a 0.20948 0.219723 0.9534 0.252732 0.8288 gamma_commute_a 0.43369 0.327174 1.3256 0.363988 1.1915 gamma_car_av_a -0.58816 0.281345 -2.0905 0.303561 -1.9375 delta_b 0.00000 NA NA NA NA gamma_commute_b 0.00000 NA NA NA NA gamma_car_av_b 0.00000 NA NA NA NA Summary of class allocation for model component : Mean prob. Class_1 0.5269 Class_2 0.4731 Overview of choices for MNL model component Class_1: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Overview of choices for MNL model component Class_2: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Classical covariance matrix: asc_1 beta_tt_a beta_tt_b beta_tc_a asc_1 0.002271 -7.440e-05 1.807e-05 -1.1504e-04 beta_tt_a -7.440e-05 6.3746e-04 -3.520e-05 0.001872 beta_tt_b 1.807e-05 -3.520e-05 2.953e-05 -3.690e-05 beta_tc_a -1.1504e-04 0.001872 -3.690e-05 0.006873 beta_tc_b 1.604e-05 -8.826e-06 5.168e-05 3.300e-05 beta_hw_a -2.568e-06 5.975e-05 -6.072e-06 1.5908e-04 beta_hw_b 2.579e-06 -4.319e-06 5.346e-06 1.701e-05 beta_ch_a 5.399e-05 0.004080 -8.096e-05 0.012081 beta_ch_b -1.315e-05 5.3359e-04 9.395e-05 0.002311 delta_a -8.244e-05 0.002029 7.492e-05 0.007216 gamma_commute_a 2.7131e-04 3.1428e-04 1.4485e-04 0.001102 gamma_car_av_a 6.073e-05 -8.1661e-04 8.023e-05 -0.001973 beta_tc_b beta_hw_a beta_hw_b beta_ch_a asc_1 1.604e-05 -2.568e-06 2.579e-06 5.399e-05 beta_tt_a -8.826e-06 5.975e-05 -4.319e-06 0.004080 beta_tt_b 5.168e-05 -6.072e-06 5.346e-06 -8.096e-05 beta_tc_a 3.300e-05 1.5908e-04 1.701e-05 0.012081 beta_tc_b 1.7000e-04 -2.267e-06 5.681e-06 2.5278e-04 beta_hw_a -2.267e-06 2.989e-05 -6.205e-06 5.3700e-04 beta_hw_b 5.681e-06 -6.205e-06 9.732e-06 -2.285e-05 beta_ch_a 2.5278e-04 5.3700e-04 -2.285e-05 0.049705 beta_ch_b 1.3475e-04 -3.400e-05 9.514e-05 0.004212 delta_a 3.4620e-04 1.7856e-04 6.827e-05 0.018884 gamma_commute_a 1.8260e-04 -1.7972e-04 1.5432e-04 0.012434 gamma_car_av_a -6.402e-06 -2.4242e-04 6.861e-05 -0.008948 beta_ch_b delta_a gamma_commute_a gamma_car_av_a asc_1 -1.315e-05 -8.244e-05 2.7131e-04 6.073e-05 beta_tt_a 5.3359e-04 0.002029 3.1428e-04 -8.1661e-04 beta_tt_b 9.395e-05 7.492e-05 1.4485e-04 8.023e-05 beta_tc_a 0.002311 0.007216 0.001102 -0.001973 beta_tc_b 1.3475e-04 3.4620e-04 1.8260e-04 -6.402e-06 beta_hw_a -3.400e-05 1.7856e-04 -1.7972e-04 -2.4242e-04 beta_hw_b 9.514e-05 6.827e-05 1.5432e-04 6.861e-05 beta_ch_a 0.004212 0.018884 0.012434 -0.008948 beta_ch_b 0.005587 0.006644 0.002887 1.6013e-04 delta_a 0.006644 0.048278 -0.017283 -0.031903 gamma_commute_a 0.002887 -0.017283 0.107043 -0.005328 gamma_car_av_a 1.6013e-04 -0.031903 -0.005328 0.079155 Robust covariance matrix: asc_1 beta_tt_a beta_tt_b beta_tc_a asc_1 0.002788 -4.5078e-04 5.049e-05 -0.001055 beta_tt_a -4.5078e-04 0.002307 -3.1594e-04 0.005030 beta_tt_b 5.049e-05 -3.1594e-04 9.908e-05 -5.2674e-04 beta_tc_a -0.001055 0.005030 -5.2674e-04 0.013587 beta_tc_b 5.285e-05 -1.8664e-04 8.470e-05 -3.1742e-04 beta_hw_a -1.821e-05 2.1001e-04 -4.601e-05 3.0735e-04 beta_hw_b -5.849e-06 -6.454e-05 2.555e-05 -3.333e-05 beta_ch_a -5.7124e-04 0.011024 -0.001425 0.021567 beta_ch_b -5.7340e-04 0.001184 1.5053e-04 0.005061 delta_a -0.001374 0.006216 -6.2134e-04 0.016035 gamma_commute_a 6.9042e-04 -0.003103 0.001081 -0.005911 gamma_car_av_a 0.001279 -0.003973 8.1031e-04 -0.006598 beta_tc_b beta_hw_a beta_hw_b beta_ch_a asc_1 5.285e-05 -1.821e-05 -5.849e-06 -5.7124e-04 beta_tt_a -1.8664e-04 2.1001e-04 -6.454e-05 0.011024 beta_tt_b 8.470e-05 -4.601e-05 2.555e-05 -0.001425 beta_tc_a -3.1742e-04 3.0735e-04 -3.333e-05 0.021567 beta_tc_b 1.8004e-04 -2.754e-05 1.840e-05 -5.5652e-04 beta_hw_a -2.754e-05 7.521e-05 -2.723e-05 0.001407 beta_hw_b 1.840e-05 -2.723e-05 2.498e-05 -3.7584e-04 beta_ch_a -5.5652e-04 0.001407 -3.7584e-04 0.090151 beta_ch_b 1.1115e-04 -2.1252e-04 2.5476e-04 0.005652 delta_a -2.7604e-04 5.6257e-04 -5.942e-05 0.037581 gamma_commute_a 0.001043 -0.001076 7.2926e-04 0.005057 gamma_car_av_a 5.4356e-04 -0.001059 4.5829e-04 -0.032562 beta_ch_b delta_a gamma_commute_a gamma_car_av_a asc_1 -5.7340e-04 -0.001374 6.9042e-04 0.001279 beta_tt_a 0.001184 0.006216 -0.003103 -0.003973 beta_tt_b 1.5053e-04 -6.2134e-04 0.001081 8.1031e-04 beta_tc_a 0.005061 0.016035 -0.005911 -0.006598 beta_tc_b 1.1115e-04 -2.7604e-04 0.001043 5.4356e-04 beta_hw_a -2.1252e-04 5.6257e-04 -0.001076 -0.001059 beta_hw_b 2.5476e-04 -5.942e-05 7.2926e-04 4.5829e-04 beta_ch_a 0.005652 0.037581 0.005057 -0.032562 beta_ch_b 0.010966 0.013010 0.004993 5.0566e-04 delta_a 0.013010 0.063874 -0.023467 -0.041713 gamma_commute_a 0.004993 -0.023467 0.132487 0.003304 gamma_car_av_a 5.0566e-04 -0.041713 0.003304 0.092149 Classical correlation matrix: asc_1 beta_tt_a beta_tt_b beta_tc_a asc_1 1.000000 -0.06183 0.06975 -0.02912 beta_tt_a -0.061834 1.00000 -0.25651 0.89428 beta_tt_b 0.069751 -0.25651 1.00000 -0.08190 beta_tc_a -0.029116 0.89428 -0.08190 1.00000 beta_tc_b 0.025808 -0.02681 0.72936 0.03053 beta_hw_a -0.009854 0.43285 -0.20437 0.35097 beta_hw_b 0.017348 -0.05483 0.31533 0.06577 beta_ch_a 0.005081 0.72486 -0.06682 0.65363 beta_ch_b -0.003691 0.28275 0.23130 0.37289 delta_a -0.007873 0.36582 0.06275 0.39614 gamma_commute_a 0.017400 0.03805 0.08147 0.04064 gamma_car_av_a 0.004529 -0.11496 0.05247 -0.08460 beta_tc_b beta_hw_a beta_hw_b beta_ch_a asc_1 0.025808 -0.009854 0.01735 0.005081 beta_tt_a -0.026810 0.432846 -0.05483 0.724861 beta_tt_b 0.729356 -0.204373 0.31533 -0.066821 beta_tc_a 0.030532 0.350973 0.06577 0.653628 beta_tc_b 1.000000 -0.031808 0.13967 0.086962 beta_hw_a -0.031808 1.000000 -0.36383 0.440551 beta_hw_b 0.139671 -0.363833 1.00000 -0.032851 beta_ch_a 0.086962 0.440551 -0.03285 1.000000 beta_ch_b 0.138265 -0.083209 0.40802 0.252789 delta_a 0.120846 0.148636 0.09960 0.385503 gamma_commute_a 0.042805 -0.100470 0.15120 0.170459 gamma_car_av_a -0.001745 -0.157598 0.07817 -0.142663 beta_ch_b delta_a gamma_commute_a gamma_car_av_a asc_1 -0.003691 -0.007873 0.01740 0.004529 beta_tt_a 0.282749 0.365815 0.03805 -0.114961 beta_tt_b 0.231299 0.062748 0.08147 0.052473 beta_tc_a 0.372891 0.396135 0.04064 -0.084598 beta_tc_b 0.138265 0.120846 0.04281 -0.001745 beta_hw_a -0.083209 0.148636 -0.10047 -0.157598 beta_hw_b 0.408024 0.099600 0.15120 0.078172 beta_ch_a 0.252789 0.385503 0.17046 -0.142663 beta_ch_b 1.000000 0.404525 0.11806 0.007615 delta_a 0.404525 1.000000 -0.24042 -0.516076 gamma_commute_a 0.118057 -0.240416 1.00000 -0.057887 gamma_car_av_a 0.007615 -0.516076 -0.05789 1.000000 Robust correlation matrix: asc_1 beta_tt_a beta_tt_b beta_tc_a asc_1 1.00000 -0.1778 0.09607 -0.17148 beta_tt_a -0.17776 1.0000 -0.66088 0.89849 beta_tt_b 0.09607 -0.6609 1.00000 -0.45400 beta_tc_a -0.17148 0.8985 -0.45400 1.00000 beta_tc_b 0.07460 -0.2896 0.63418 -0.20295 beta_hw_a -0.03976 0.5042 -0.53300 0.30403 beta_hw_b -0.02216 -0.2689 0.51366 -0.05721 beta_ch_a -0.03603 0.7645 -0.47697 0.61624 beta_ch_b -0.10370 0.2354 0.14442 0.41461 delta_a -0.10297 0.5121 -0.24699 0.54431 gamma_commute_a 0.03592 -0.1775 0.29838 -0.13933 gamma_car_av_a 0.07982 -0.2725 0.26818 -0.18647 beta_tc_b beta_hw_a beta_hw_b beta_ch_a asc_1 0.07460 -0.03976 -0.02216 -0.03603 beta_tt_a -0.28962 0.50420 -0.26887 0.76447 beta_tt_b 0.63418 -0.53300 0.51366 -0.47697 beta_tc_a -0.20295 0.30403 -0.05721 0.61624 beta_tc_b 1.00000 -0.23667 0.27439 -0.13814 beta_hw_a -0.23667 1.00000 -0.62809 0.54025 beta_hw_b 0.27439 -0.62809 1.00000 -0.25045 beta_ch_a -0.13814 0.54025 -0.25045 1.00000 beta_ch_b 0.07911 -0.23401 0.48676 0.17975 delta_a -0.08140 0.25667 -0.04704 0.49524 gamma_commute_a 0.21357 -0.34074 0.40086 0.04628 gamma_car_av_a 0.13345 -0.40213 0.30206 -0.35725 beta_ch_b delta_a gamma_commute_a gamma_car_av_a asc_1 -0.10370 -0.10297 0.03592 0.07982 beta_tt_a 0.23540 0.51214 -0.17750 -0.27249 beta_tt_b 0.14442 -0.24699 0.29838 0.26818 beta_tc_a 0.41461 0.54431 -0.13933 -0.18647 beta_tc_b 0.07911 -0.08140 0.21357 0.13345 beta_hw_a -0.23401 0.25667 -0.34074 -0.40213 beta_hw_b 0.48676 -0.04704 0.40086 0.30206 beta_ch_a 0.17975 0.49524 0.04628 -0.35725 beta_ch_b 1.00000 0.49158 0.13099 0.01591 delta_a 0.49158 1.00000 -0.25510 -0.54371 gamma_commute_a 0.13099 -0.25510 1.00000 0.02990 gamma_car_av_a 0.01591 -0.54371 0.02990 1.00000 Settings and functions used in model definition: apollo_control -------------- Value modelName "LC_with_covariates" modelDescr "LC model with covariates in class allocation model on Swiss route choice data" indivID "ID" nCores "3" outputDirectory "output/" debug "FALSE" workInLogs "FALSE" seed "13" mixing "FALSE" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" dropLoopExpansion "FALSE" dropRedefCheck "FALSE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient apollo_lcPars --------------- function (apollo_beta, apollo_inputs) { lcpars = list() lcpars[["beta_tt"]] = list(beta_tt_a, beta_tt_b) lcpars[["beta_tc"]] = list(beta_tc_a, beta_tc_b) lcpars[["beta_hw"]] = list(beta_hw_a, beta_hw_b) lcpars[["beta_ch"]] = list(beta_ch_a, beta_ch_b) V = list() V[["class_a"]] = delta_a + gamma_commute_a * commute + gamma_car_av_a * car_availability V[["class_b"]] = delta_b + gamma_commute_b * commute + gamma_car_av_b * car_availability classAlloc_settings = list(classes = c(class_a = 1, class_b = 2), utilities = V) lcpars[["pi_values"]] = apollo_classAlloc(classAlloc_settings) return(lcpars) } apollo_probabilities ---------------------- function (apollo_beta, apollo_inputs, functionality = "estimate") { apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) P = list() mnl_settings = list(alternatives = c(alt1 = 1, alt2 = 2), avail = list(alt1 = 1, alt2 = 1), choiceVar = choice) for (s in 1:2) { V = list() V[["alt1"]] = asc_1 + beta_tc[[s]] * tc1 + beta_tt[[s]] * tt1 + beta_hw[[s]] * hw1 + beta_ch[[s]] * ch1 V[["alt2"]] = asc_2 + beta_tc[[s]] * tc2 + beta_tt[[s]] * tt2 + beta_hw[[s]] * hw2 + beta_ch[[s]] * ch2 mnl_settings$utilities = V P[[paste0("Class_", s)]] = apollo_mnl(mnl_settings, functionality) P[[paste0("Class_", s)]] = apollo_panelProd(P[[paste0("Class_", s)]], apollo_inputs, functionality) } lc_settings = list(inClassProb = P, classProb = pi_values) P[["model"]] = apollo_lc(lc_settings, apollo_inputs, functionality) P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }